<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="../header.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE html>

<head>

	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">


	<title></title>
	<meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
	<meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

	<link rel="shortcut icon" href="favicon.ico"> <link href="${path}/static/login/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
	<link href="${path}/static/login/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
	<link href="${path}/static/login/css/plugins/iCheck/custom.css" rel="stylesheet">
	<link href="${path}/static/login/css/animate.min.css" rel="stylesheet">
	<link href="${path}/static/login/css/style.min.css?v=4.0.0" rel="stylesheet"><base target="_blank">
	<script>if(window.top !== window.self){ window.top.location = window.location;}</script>

</head>

<body class="gray-bg">

<div class="middle-box text-center loginscreen   animated fadeInDown">
	<div>
		<div>

			<h1 class="logo-name">Hi !</h1>

		</div>
		<h3>欢迎注册</h3>
		<p>创建一个新账户</p>
		<form class="m-t" role="form" action="login.html" id="formId">
			<div class="form-group">
				<input type="text" class="form-control" placeholder="请输入用户名" required="" id="name" name="name">
			</div>
			<%--<div class="form-group">
				<input type="text" class="form-control" placeholder="请输入真实姓名" required="" id="true_name" name="true_name">
			</div>--%>
			<div class="form-group">
				<input type="password" class="form-control" placeholder="请输入密码" required="" id="password" name="password">
			</div>
			<div class="form-group">
				<input type="email" class="form-control" placeholder="请输入邮箱" required="" id="email" name="email">
			</div>
			<div class="form-group">
				<input type="text" class="form-control" placeholder="请输入手机号" required="" id="phone" name="phone">
			</div>
			<div class="form-group text-left">
				<div class="checkbox i-checks">
					<label class="no-padding">
						<input type="checkbox"><i></i> 我同意注册协议</label>
				</div>
			</div>
		</form>
			<button type="submit" class="btn btn-primary block full-width m-b" onclick="submitForm()">注 册</button>

			<p class="text-muted text-center"><small>已经有账户了？</small><a href="${path}/user/getLoginPage">点此登录</a>
			</p>


	</div>
</div>
<script src="${path}/static/login/js/jquery.min.js?v=2.1.4"></script>
<script src="${path}/static/login/js/bootstrap.min.js?v=3.3.5"></script>
<script src="${path}/static/login/js/plugins/iCheck/icheck.min.js"></script>
<script>
	$(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
</script>
    <script type="text/javascript">
		function submitForm() {
			$.post('${path}/user/register',
					$('#formId').serialize(),
					function(jsonResult) {
						//console.log(jsonResult);
						if(jsonResult.ok) {
							/* mylayer.okMsg(jsonResult.msg);
                            layer.msg(
                                jsonResult.msg,

                                {icon : 1, time : 2000},
                                function() {
                                    window.location.href = "${path}/login/getLoginPage.shtml";
						    }
						); */
							mylayer.okUrl(jsonResult.msg, '${path}/user/getLoginPage');

						} /* else {
						mylayer.errorMsg(jsonResult.msg);
					} */
					},
					'json');
		}
	</script>


</body>


</html>